package br.mil.pamerj.efetivo.dao.conexao;

import org.hibernate.Session;

import br.mil.pamerj.efetivo.dao.util.HibernateUtil;
/**
 import br.mil.pamerj.efetivo.interfaces.ServiceFactory;
 
import br.mil.pamerj.efetivo.interfaces.PaisService;
import br.mil.pamerj.efetivo.model.Pais;
import br.mil.pamerj.efetivo.service.util.ServiceUtil;
*/

public class ConectaHibernatePostgresql {

public ConectaHibernatePostgresql() {
	
	}
public static void main(String[] args) {
	Session sessao = null;
//	ServiceFactory factory;
	//PaisService service; 
	//List<Pais> paises;
	
	try{
		sessao = HibernateUtil.getSessionFactory().openSession();
		System.out.println("Conectou");
		//factory = ServiceUtil.getServiceFactory();
		//service  = factory.getPaisService();
		//paises = service.listPais();
		//System.out.println("Países cadastrados--------------:");
		//for(Pais pais:paises){
		//	System.out.println(pais.getDescricao());
				
		//}
		
	}finally{
		sessao.close();
	}

}
	/**
	 * @param args
	 */
	

}
